@extends('admin.layout.main')

@section('content')
    <div class="breadcrumbs ace-save-state" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="ace-icon fa fa-home home-icon"></i>
                <a href="#">首页</a>
            </li>
            <li class="active"><a href="{{ url('admin/user') }}">会员管理</a></li>
            <li class="active"><a href="{{ url('admin/user/add_user') }}">添加会员</a></li>
        </ul><!-- /.breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search">
		<span class="input-icon">
		<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
			<i class="ace-icon fa fa-search nav-search-icon"></i>
		</span>
            </form>
        </div><!-- /.nav-search -->
    </div>

    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <form class="form-horizontal" role="form" action="/admin/editor_user" method="post">
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 电子邮箱或手机号 </label>

                    <div class="col-sm-9">
                        <input type="text" id="form-field-1" name="account" value="{{old('account')}}" placeholder="您的电子邮箱或手机号" class="col-xs-10 col-sm-5" />
                        <input type="hidden" name="_token" value="{{csrf_token()}}"/>
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 登录密码 </label>

                    <div class="col-sm-9">
                        <input type="password"  name="password" placeholder="您的登录密码" class="col-xs-10 col-sm-5" />
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 重复登录密码 </label>

                    <div class="col-sm-9">
                        <input type="password"  name="real_password" placeholder="请填写您的登录密码" class="col-xs-10 col-sm-5" />
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 交易密码 </label>

                    <div class="col-sm-9">
                        <input type="password"  name="pay_pass" placeholder="请填写您的登录密码" class="col-xs-10 col-sm-5" />
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 重复交易密码 </label>

                    <div class="col-sm-9">
                        <input type="password"  name="re_pay_pass" placeholder="请填写您的登录密码" class="col-xs-10 col-sm-5" />
                    </div>
                </div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="submit" >
                            <i class="ace-icon fa fa-check bigger-110"></i>
                            提交
                        </button>

                        &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset" onclick="javascript:history.go(-1)">
                            <i class="ace-icon fa fa-undo bigger-110"></i>
                            返回
                        </button>
                        
                    </div>
                </div>
            </form>
        </div>
    </div>
    </div><!-- /.main-content -->
    <script>
        function on_add() {
            $.ajax({
                type : "POST",
                url:'/admin/add_user',
                data : $('form').serialize(),
                success: function(res){
                        if(res.status == 1){
                            layer.msg('添加成功',{icon:1,time:100000000})
//                            location.href= '/user/index'
                            location.href= '/admin/user_list'
                        }else{
                            layer.msg(res.msg, {icon: 2});
                        }
                }
            });
        }
    </script>
@endsection
